Optimal. Leaf size=64 \[ \frac{3 a^2 b \log (\tan (c+d x))}{d}-\frac{a^3 \cot (c+d x)}{d}+\frac{3 a b^2 \tan (c+d x)}{d}+\frac{b^3 \tan ^2(c+d x)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0525311, antiderivative size = 64, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {3516, 43} \[ \frac{3 a^2 b \log (\tan (c+d x))}{d}-\frac{a^3 \cot (c+d x)}{d}+\frac{3 a b^2 \tan (c+d x)}{d}+\frac{b^3 \tan ^2(c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3516
Rule 43
Rubi steps
\begin{align*} \int \csc ^2(c+d x) (a+b \tan (c+d x))^3 \, dx &=\frac{b \operatorname{Subst}\left (\int \frac{(a+x)^3}{x^2} \, dx,x,b \tan (c+d x)\right )}{d}\\ &=\frac{b \operatorname{Subst}\left (\int \left (3 a+\frac{a^3}{x^2}+\frac{3 a^2}{x}+x\right ) \, dx,x,b \tan (c+d x)\right )}{d}\\ &=-\frac{a^3 \cot (c+d x)}{d}+\frac{3 a^2 b \log (\tan (c+d x))}{d}+\frac{3 a b^2 \tan (c+d x)}{d}+\frac{b^3 \tan ^2(c+d x)}{2 d}\\ \end{align*}
Mathematica [A] time = 0.975801, size = 126, normalized size = 1.97 \[ -\frac{\csc (c+d x) \sec ^2(c+d x) \left (3 a \left (a^2-b^2\right ) \cos (c+d x)+\left (a^3+3 a b^2\right ) \cos (3 (c+d x))-2 b \sin (c+d x) \left (3 a^2 \log (\sin (c+d x))-3 a^2 \log (\cos (c+d x))-3 a^2 \cos (2 (c+d x)) (\log (\cos (c+d x))-\log (\sin (c+d x)))+b^2\right )\right )}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.056, size = 63, normalized size = 1. \begin{align*}{\frac{{b}^{3}}{2\,d \left ( \cos \left ( dx+c \right ) \right ) ^{2}}}+3\,{\frac{a{b}^{2}\tan \left ( dx+c \right ) }{d}}+3\,{\frac{b{a}^{2}\ln \left ( \tan \left ( dx+c \right ) \right ) }{d}}-{\frac{{a}^{3}\cot \left ( dx+c \right ) }{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.10142, size = 76, normalized size = 1.19 \begin{align*} \frac{b^{3} \tan \left (d x + c\right )^{2} + 6 \, a^{2} b \log \left (\tan \left (d x + c\right )\right ) + 6 \, a b^{2} \tan \left (d x + c\right ) - \frac{2 \, a^{3}}{\tan \left (d x + c\right )}}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.04725, size = 327, normalized size = 5.11 \begin{align*} -\frac{3 \, a^{2} b \cos \left (d x + c\right )^{2} \log \left (\cos \left (d x + c\right )^{2}\right ) \sin \left (d x + c\right ) - 3 \, a^{2} b \cos \left (d x + c\right )^{2} \log \left (-\frac{1}{4} \, \cos \left (d x + c\right )^{2} + \frac{1}{4}\right ) \sin \left (d x + c\right ) - 6 \, a b^{2} \cos \left (d x + c\right ) + 2 \,{\left (a^{3} + 3 \, a b^{2}\right )} \cos \left (d x + c\right )^{3} - b^{3} \sin \left (d x + c\right )}{2 \, d \cos \left (d x + c\right )^{2} \sin \left (d x + c\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \tan{\left (c + d x \right )}\right )^{3} \csc ^{2}{\left (c + d x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 2.06722, size = 95, normalized size = 1.48 \begin{align*} \frac{b^{3} \tan \left (d x + c\right )^{2} + 6 \, a^{2} b \log \left ({\left | \tan \left (d x + c\right ) \right |}\right ) + 6 \, a b^{2} \tan \left (d x + c\right ) - \frac{2 \,{\left (3 \, a^{2} b \tan \left (d x + c\right ) + a^{3}\right )}}{\tan \left (d x + c\right )}}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]